import { defHttp } from "@/utils/http";

// ERP 报损单API
export const drugFrmLossApi = {
	// 获得报损单分页
	drugFrmLossList: async (params: any) => {
		return await defHttp.get({ url: `/whs/drug-frm-loss/page`, params });
	},
	// 新增报损单
	drugFrmLossCreate: async (data: any) => {
		return await defHttp.post({ url: `/whs/drug-frm-loss/create`, data });
	},

	// 修改报损单
	drugFrmLossUpdate: async (data: any) => {
		return await defHttp.put({ url: `/whs/drug-frm-loss/update`, data });
	},

	// 删除报损单
	drugFrmLossDelete: async (id: number) => {
		return await defHttp.delete({ url: `/whs/drug-frm-loss/delete?id=` + id });
	},
	//获得按批次仓库获得产品库存数量
	drugBatchGetCount: async (params: any) => {
		return await defHttp.get({ url: `/whs/drug-batch/get-count`, params });
	}
};
